14. Generate Features

Generating Features

To get started generating features, launch the training.launch file to bring up the Gazebo environment. An empty environment should appear with only the sensor stick robot in the scene:

$ cd ~/catkin_ws
$ roslaunch sensor_stick training.launch

Keep an eye out for errors in the terminal and if Gazebo crashes or doesn't come up just give it another try, sometimes takes a few attempts!

Capturing Features

Next, in a new terminal, run the capture_features.py script to capture and save features for each of the objects in the environment. This script spawns each object in random orientations (default 5 orientations per object) and computes features based on the point clouds resulting from each of the random orientations.

$ cd ~/catkin_ws
$ rosrun sensor_stick capture_features.py

The features will now be captured and you can watch the objects being spawned in Gazebo. It should take 5-10 seconds for each random orientation (depending on your machine's resources). There are 7 objects total so it takes awhile to complete. When it finishes running you should have a training_set.sav file containing the features and labels for the dataset. Note: The training_set.sav file will be saved in your catkin_ws folder.